package com.ld.security.server.admin.modules.ge.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.ld.security.common.core.anno.IdKey;
import com.ld.security.common.core.base.OrderByPo;
import com.ld.security.common.core.base.column.ListJson;
import com.ld.security.common.core.base.column.ListString;
import com.ld.security.common.mybatis.anno.SqlKey;
import com.ld.security.common.mybatis.base.entity.ESortEntity;
import com.ld.security.common.mybatis.base.entity.SuperEntity;
import com.ld.security.common.mybatis.base.vo.ProxyVo;
import com.ld.security.common.mybatis.constant.SqlCondition;
import com.ld.security.server.admin.modules.ge.constant.GeModelConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@TableName("ge_model")
@ApiModel("模型")
@Data
public class GeModelEntity extends SuperEntity implements ProxyVo,ESortEntity
{

    @ApiModelProperty("父编码")
    private String parentCodes;

    @SqlKey
    @ApiModelProperty("顺序值")
    private Integer sortVal;

    @SqlKey(SqlCondition.like)
    @ApiModelProperty("标题")
    private String label;

    @SqlKey(SqlCondition.like)
    @ApiModelProperty("视图")
    private String viewId;

    @SqlKey(SqlCondition.eq)
    @ApiModelProperty("数据源编号")
    private String dataSourceId;


    @SqlKey(SqlCondition.like)
    @ApiModelProperty("编码")
    private String code;




    /**
     * 模型类型
     */
    @SqlKey(SqlCondition.eq)
    @ApiModelProperty("模型类型")
    private GeModelConstant.modelType modelType;



    @ApiModelProperty("表达式")
    private String sqlTel;

    @ApiModelProperty("模型模板")
    private String modelTelId;

    @ApiModelProperty("表集合")
    private ListString tableIds;

    @ApiModelProperty("配置")
    private ListJson config;

    private static GeModelEntity model;

    static {
        model = new GeModelEntity();
        model.setModelType(GeModelConstant.modelType.model);
        model.setTableIds(new ListString());

    }
}
